package com.zx.system.block.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 字典类型变更事件
 * 当字典类型发生增删改时发布此事件，通知相关组件清理缓存
 */
@Getter
public class DictTypeChangeEvent extends ApplicationEvent {

    private final String dictType;
    private final String operation; // ADD, UPDATE, DELETE

    /**
     * 构造函数
     *
     * @param source    事件源
     * @param dictType  字典类型
     * @param operation 操作类型
     */
    public DictTypeChangeEvent(Object source, String dictType, String operation) {
        super(source);
        this.dictType = dictType;
        this.operation = operation;
    }
}